<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>24-处理湖北边界数据适应鸿蒙地图多边形结构</title>
  <script src="../assets/js/hubeiPolygon.js"></script>
  <script src="../assets/js//chinaMultiPolygon.js"></script>
</head>

<body>
  <script>
    let hubeiPolygonData = hubeiPolygon.features[0].geometry.coordinates[0].map(item => {
      return {
        longitude: item[0],
        latitude: item[1]
      }
    }); 

    console.log('湖北边界多边形数据：', hubeiPolygonData);

    let chinaMultiPolygonDataOne = chinaMultiPolygon.features[0].geometry.coordinates[0][0].map(item => {
      return {
        longitude: item[0],
        latitude: item[1]
      }
    });

    console.log('中国多边形数据第一部分：', chinaMultiPolygonDataOne);

    let chinaMultiPolygonDataTwo = chinaMultiPolygon.features[0].geometry.coordinates[1][0].map(item => {
      return {
        longitude: item[0],
        latitude: item[1]
      }
    });

    console.log('中国多边形数据第二部分：', chinaMultiPolygonDataTwo);

    let chinaMultiPolygonDataThree = chinaMultiPolygon.features[0].geometry.coordinates[2][0].map(item => {
      return {
        longitude: item[0],
        latitude: item[1]
      }
    });

    console.log('中国多边形数据第三部分：', chinaMultiPolygonDataThree);
  </script>
</body>

</html>